<?php

// wf_del.php
// Michael Baker
// 2010.07.12
//
// Drop a workflow

session_start();

define("IN_MDM", true);
define("CUR_PAGE_TITLE", "Delete workflow");
define("CUR_FLAG", "wf.del");

include '../includes/all.php';
include 'inc/header.php';

$id = $_GET[ "id" ];

if ( $_GET["confirm"] )
{
  $dbase->delete_workflow( $id );
  $_SESSION["MESSAGE"] = array( 0, "Workflow #$id deleted" );
    
  header( "Location: wf_list.php" );
}
else
{
  $_SESSION[ "from" ] = "wf_list.php";
  $_SESSION[ "to" ]   = "wf_del.php?id=$id&confirm=1";
  $_SESSION[ "confirm_msg" ] = "Are you sure you wish to delete this workflow?";
  
  header( "Location: confirm.php" );
}

?>